package com.mujin.keji.collectionsystem.module.updata.repository;

import android.arch.lifecycle.LiveData;

import com.mujin.keji.collectionsystem.base.BaseDto;
import com.mujin.keji.collectionsystem.base.CommonRepository;
import com.mujin.keji.collectionsystem.http.Api;
import com.mujin.keji.collectionsystem.module.updata.dto.UploadDto;
import com.mujin.keji.collectionsystem.module.updata.vo.UploadVo;

import java.io.File;
import java.util.List;

/**
 * 上传文件Repository
 *
 * @author weishixiong
 * @Time 2018-05-3
 */
public class UploadRepository extends CommonRepository<UploadDto> implements IUploadRepository {

    /**
     * 上传单个案件文件
     *
     * @param vo
     * @param fileList
     * @return
     */
    @Override
    public LiveData<BaseDto<UploadDto>> uploadUserFile(UploadVo vo, List<File> fileList) {
        return request(Api.uploadUserFile(vo, fileList, "*/*")).send().get();

    }


}
